package display
{
	import display.data.CTextFieldType;
	
	import flash.text.AntiAliasType;
	import flash.text.GridFitType;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	
	public class CTextField extends TextField
	{
		public function CTextField( type: String = "" )
		{
			this.defaultTextFormat = CTextFormat.getInstance().componentTitle;
			this.autoSize = TextFieldAutoSize.LEFT;
			this.embedFonts = true
			this.antiAliasType = AntiAliasType.ADVANCED;
			this.gridFitType = GridFitType.PIXEL;
			this.selectable = false;
			this.mouseEnabled = false;
			
			switch( type )
			{
				case CTextFieldType.TITLE:
					this.sharpness = -200;
					this.thickness = 100;
					this.defaultTextFormat = CTextFormat.getInstance().title;
					break;
				case CTextFieldType.LIST:
					this.sharpness = 5;
					this.thickness = 5;
					break;
				case CTextFieldType.PANEL_TITLE:
					this.sharpness = -200;
					this.thickness = 100;
					break;
				case CTextFieldType.BUTTON_TITLE:
					this.sharpness = 5;
					this.thickness = 10;
					break;
				case "":
					break;
			}
		}
	}
}